@use "sass:math";
/*
usage:
.wrapper{
width:50px;
background-color:#fff;
color:#000;
@include ellipsis();
}
*/
@mixin ellipsis(){
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
@function to_vw($px){
  //,设计稿宽度 1920 vw基准值为百分之一  像素换算 px/19.20
  //@return($px/$base_size) * 1vw;
  @return math.div($px, $vw_base) * 100vmax;
}

@import "./themes.scss";

@mixin themeify{
  @each $theme-name, $theme-map in $themes{
    //!global 把局部变量强升为全局变量
    $theme-map: $theme-map !global;
    [data-theme='#{$theme-name}'] & {
      @content;
    }
  }
}

@mixin themeifyBg{
  @each $theme-name, $theme-map in $themes{
    //!global 把局部变量强升为全局变量
    $theme-map: $theme-map !global;
    &[data-theme='#{$theme-name}']{
      @content;
    }
  }
}


@function themed($key){
  @return map-get($theme-map, $key);
}
